import request from '@/utils/request'

// 获取用户列表
export const GetSysUserListByPage = (pageNum, pageSize, queryDto) => {
  return request({
    url: "/admin/system/sysUser/findByPage/" + pageNum + "/" + pageSize,
    method: 'GET',
    data: queryDto
  })
}

// 新增用户
export const SaveSysUser = (sysUser) => {
  return request({
    url: "/admin/system/sysUser/saveSysUser",
    method: 'POST',
    data: sysUser
  })
}

// 修改用户
export const UpdateSysUser = (sysUser) => {
  return request({
    url: "/admin/system/sysUser/updateSysUser",
    method: 'PUT',
    data: sysUser
  })
}

// 删除用户
export const DeleteSysUserById = (userId) => {
  return request({
    url: "/admin/system/sysUser/delete/" + userId,
    method: 'DELETE'
  })
}

// 给用户分配角色请求
export const DoAssignRoleToUser = (assginRoleVo) => {
  return request({
      url: "/admin/system/sysUser/doAssign",
      method: 'post',
      data: assginRoleVo
  })
}